const express = require('express');

const router = express.Router();

const article_handler = require('../router_handler/article');

const expressJoi = require('@escook/express-joi');

const { add_cate_schema, delete_cate_schema, get_cate_schema, update_cate_schema } = require('../schema/article');

router.get('/cates', article_handler.getArticleCates)

router.post('/addcates', expressJoi(add_cate_schema), article_handler.addArticleCates)

router.get('/deletecate/:id', expressJoi(delete_cate_schema), article_handler.deleteCateById)

router.get('/cates/:id', expressJoi(get_cate_schema), article_handler.getArtCateById)

router.get('/updatecate', expressJoi(update_cate_schema), article_handler.updateCateById)

module.exports = router;